import Vue from 'vue'
import App from './App'
import VueRouter from "vue-router"
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);
Vue.use(VueRouter)
import Goods from './components/goods/Goods';
import Ratings from "./components/ratings/Ratings"
import Seller from "./components/seller/Seller"
import login from './components/login/login'
import register from './components/login/register'
import Home from './components/Home'
Vue.config.productionTip = false

const routes = [
	{
		path: "/",
		redirect: "/login"
	},
	{
		path: "/login",
		component: login
	},
	{
		path: "/home",
		component: Home
	},
	{
		path: "/goods",
		component: Goods
	},
	{
		path: "/register",
		component: register
	},
	{
		path: "/ratings",
		component: Ratings
	},
	{
		path: "/seller",
		component: Seller
	}
]

const router = new VueRouter({
	routes,
	mode: "history",
	linkActiveClass: "active"
})

new Vue({
	el: '#app',
	router,
	components: {
		App
	},
	template: '<App/>'
})
